<div class="modal-header">
  <button type="button" class="close" ng-click="cancel()">
    <span aria-hidden="true">&times;</span>
    <span class="sr-only">Close</span>
  </button>
  <h3 class="modal-title">Change Password</h3>
</div>
<div class="modal-body reset-offset-modal-body">

  <ng-include src="'app/home/alerts/error/errorAlert.tpl.html'"></ng-include>

  <div class="alert alert-success" role="alert"
       ng-show="isOffsetResetSucceed"
       translate="home.resetOffset.successMessage">
  </div>

  <div class="form-group">
    <label class="control-label">Current Password</label>
    <input type="password"
        autocomplete="current-password"
        ng-disabled="{{ isCreateInProgress }}"
        autofocus
        class="form-control"
        ng-model="userModel.oldPwd">
    <small ng-if="oldPwdError" class="invalid">{{oldPwdError}}</small>
  </div>
  <div class="form-group">
    <label class="control-label">New Password</label>
    <input type="password"
        autocomplete="new-password"
        ng-disabled="{{ isCreateInProgress }}"
        class="form-control"
        ng-model="userModel.newPwd">
    <small ng-if="newPwdError" class="invalid">{{newPwdError}}</small>
    <small class="form-text text-muted">Password must be 6-12 characters, and must not contain spaces.</small>
  </div>
  <div class="form-group">
    <label class="control-label">New Password Verification</label>
    <input type="password"
        autocomplete="new-password"
        ng-disabled="{{ isCreateInProgress }}"
        class="form-control"
        ng-model="userModel.newPwdVerif">
    <small ng-if="newPwdVerifError" class="invalid">{{newPwdVerifError}}</small>
    <small class="form-text text-muted">To confirm, type the new password again.</small>
  </div>

  <div show-loading="showLoading"></div>
</div>
<div class="modal-footer" ng-hide="showLoading">
  <button type="button" class="btn btn-default"
          ng-click="cancel()">Cancel</button>
  <button type="button" class="btn btn-primary"
          ng-click="save()">Save</button>
</div>
